﻿@model IEnumerable<AuthoSYS.EF.Permission>
@{
    ViewBag.Title = "Index";
}
<h2>
    Index</h2>
<p>
    @Html.ActionLink("Create New", "Create", new { moduleId = ViewBag.ModuleId })
</p>
<table>
    <tr>
        <th>
            @Html.DisplayNameFor(model => model.Module.Application.ApplicationName)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Module.ModuleName)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.PermissionName)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.PermissionValue)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Description)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.IsLocked)
        </th>
        <th>
        </th>
    </tr>
    @foreach (var item in Model)
    {
        <tr>
            <td>
                @Html.DisplayFor(modelItem => item.Module.Application.ApplicationName)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.Module.ModuleName)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.PermissionName)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.PermissionValue)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.Description)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.IsLocked)
            </td>
            <td>
                @Html.ActionLink("Edit", "Edit", new { id = item.Id }) |
                @Html.ActionLink("Details", "Details", new { id = item.Id }) |
                @Html.ActionLink("Delete", "Delete", new { id = item.Id })
            </td>
        </tr>
    }
</table>
